feat(webapp): support vercel prod deploy with dev/prod gating#72
Merged
feat(webapp): support vercel prod deploy with dev/prod gating#72
Conversation
- vercel.json for Vite + pnpm workspace builds - static network config (config/networks.ts); localnet from env vars - lib/cluster.ts decouples clusterIdToNetwork from api-client - lazy-load Setup + Program routes, render only when DEV - useNetworkConfig falls back to static; PROD never hits api - SetupGuard no-ops in PROD or when localnet env vars present - just dev-local bootstraps surfpool + USDC mint + .env.local - gitignore .env.local
prettier ignore + gitignore for editor/tool configs that vary per dev.
eslint was scanning worktrees under .claude/ and flagging deleted apps/.
Compute Unit Report
Generated: 2026-04-30 |
Replace setup-only NetworkButton with a dropdown using useCluster().setCluster() so users can switch between devnet, mainnet, testnet (and localnet in DEV) without going through the setup wizard. Mainnet RPC defaults to public endpoint, overridable via VITE_MAINNET_RPC_URL. "Rerun setup" stays available in DEV.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
webapp/vercel.jsonand static network config so the webapp can deploy to Vercel without the local dev api serverSetup+Programroutes; render only whenimport.meta.env.DEV(prod build excludes them from the active route table)useNetworkConfigfalls back to static config in DEV and uses static-only in PROD;SetupGuardno-ops whenVITE_LOCALNET_USDC_MINTis setjust dev-localrecipe bootstraps surfpool + program + mock USDC and writeswebapp/.env.local, so contributors can skip the api server entirely.claude/and.git/(was scanning worktree copies of deletedapps/)Test Plan
pnpm --filter @subscriptions/client build && pnpm --filter webapp build→ succeedsjust lint-check→ passesjust fmt-check→ passeswebapp, deploy → static config picks up devnet program ID + USDC mintjust dev-local && pnpm --filter webapp dev→ loads localnet config from.env.local, skips setup wizardpnpm --filter subscriptions-api dev & pnpm --filter webapp dev→ setup wizard still runs as before